<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>react-hello</title>

</head>
<body>
<button onclick="btnClick()">按钮1</button>
<div id="root">

</div>
</body>
<script src="../../lib/react/react.development.js"></script>
<script src="../../lib/react/react-dom.development.js"></script>
<script src="../../lib/react/babel.min.js"></script> <!--jsx -->
<script type="text/babel"> /*jsx:   JavaScript 扩展模板*/

   let  param1 = "变量1";

  function display(){

    return 'hello world'
  }

  //let element =<div> <h1>hello world</h1></div>;/*jsx*/

  /*插值*/
 // let element = <h1>{display()}</h1> /*{表达式}*/
  /*let element = <h1>{3+4}</h1>*/

let element = <h1>{param1}</h1>

   /* let url = "index.html";

   let element = <a href={url}>主页</a>*/

 /*  function btnClick(){
      alert('click');
   }
   let element = <button onClick={btnClick}>按钮1</button>;*/

  ReactDOM.render(element,document.getElementById('root'));/*render 渲染*/

</script>

</html>
